import { API } from '../constant';

export const getAPI = (name, type = 'api') => {
  const target = API[name];
  if (_.isString(target)) return target;

  if (type === 'action') return target[type];

  return `${_.get(API, `BASE_URL[${type}]`, '')}/${target[type]}`;
};

export { getMenuList } from './getMenu';
